﻿using System.Drawing;

namespace GurLoader.Screenshot
{
    public class ScreenshotCapture
    {
        public Image CaptureImage(Point sourcePoint, Point destinationPoint, Rectangle selectionRectangle)
        {
            Image img = new Bitmap(selectionRectangle.Width, selectionRectangle.Height);
            using (Graphics g = Graphics.FromImage(img))
            {
                g.CopyFromScreen(sourcePoint, destinationPoint, selectionRectangle.Size);
            }

            return img;
        }
    }
}
